Who's Online |
66 user(s) are online ( 44 user(s) are browsing Forums)
Members: 0
Guests: 66
more...
|
|
|
|
Re: Torque for OS4 progress
|
Posted on: 2010/4/3 21:25
#61
|
Just popping in
|
@kas1e
I currently consider it to be Alpha :)
I only have the demo assest provided by Garage Games, but if they will let me release this demo for Amiga, then I will make it available, once I feel that it is stable enough.
|
|
|
|
Torque for OS4 progress
|
Posted on: 2010/4/3 13:07
#62
|
Just popping in
|
Hello, I just wanted to let everyone know that you can now follow the progress of the Torque port for OS4 on http://www.game-engine.dk
|
|
|
|
Re: SilverGreen Theme
|
Posted on: 2010/1/16 22:26
#63
|
Just popping in
|
@tommo1975
Change the color in the textures: SYS:Prefs/Presets/SilverGreen/Bitmaps/Titlebar/
|
|
|
|
Re: My Take on timberwolf logo
|
Posted on: 2009/10/22 9:16
#64
|
Just popping in
|
@magic
even though it is dark the light appears to be coming from different directions, which makes it look a little odd.
|
|
|
|
Re: developers, what are you working on?
|
Posted on: 2009/3/7 22:21
#65
|
Just popping in
|
@spotUP
xscreensavers TGE MiniGL
|
|
|
|
Re: Are AmigaOS4 SDK compiler, MACRO compilers ?
|
Posted on: 2009/3/7 22:20
#66
|
Just popping in
|
@freddix I actually had to look up what macro compilers might mean, this might be it, not sure: http://en.wikipedia.org/wiki/Macro_(computer_science) But yes you can write macros in c/c++ using the #define preprocessor statement, a classic example:
#define safe_free(x) { \
free(x);\
x = NULL;\
}
|
|
|
|
Re: GCC, Dynamic structure creation method ?
|
Posted on: 2009/3/1 23:54
#67
|
Just popping in
|
@Gazelle But if you use a typedef, you dont need to type
struct MyStruct {int data;};
struct MyStruct someStruct;
struct MyStruct* sameStruct;
sameStruct = &someStruct;
you can just type:
typedef struct {int data;} MyStruct;
MyStruct someStruct;
MyStruct* sameStruct;
sameStruct = &someStruct;
|
|
|
|
Re: GCC, Dynamic structure creation method ?
|
Posted on: 2009/3/1 22:51
#68
|
Just popping in
|
@freddix I changed a little but I did not test if it compiles :
/* Structure de Basic 3D qui peut-?tre partag?e pour les donn?es*/
typedef struct {
int B3DObjectAmount;
int *ObjectList;
int *LastCreatedObject;
}Basic3DStructType;
Basic3DStructType Basic3D;
typedef struct {
BOOL Exist;
int *PreviousObject;
int *NextObject;
int ID;
int Type;
float XPos, YPos, ZPos;
float XRot, YRot, ZRot;
float XScale, YScale, ZScale;
int *TextureImage;
BOOL Hidden, Culling, Transparency, WireFrame, Fog, Ambient, Lights, Filtering;
float RGBRed, RGBGreen, RGBBlue;
BOOL IsGhost;
int GhostMode;
int Diffuse, Ambience, Specular, Emissive, SpecularPower;
int *DetailMappingImage, Smoothing, AlphaMappingPercent;
}Object3DType;
// #include "_SystemIncludes.c"
#include "Basic3D_EngineInformations.c"
/* 0. System functions unavailable to user */
Object3DType *Allocate3DObject( int ObjectID ){ // is line 49
Object3DType *NewObject = IExec -> AllocVecTags( sizeof( Object3DType ), TAG_DONE );
if ( !NewObject ){
return NULL;
}
// On modifie les param?tres de l'objet 3D fraichement cr?e.
NewObject->PreviousObject = Basic3D.LastCreatedObject;
NewObject->Exist = 1;
NewObject->ID = ObjectID;
NewObject->PreviousObject = Basic3D.LastCreatedObject;
NewObject->RGBRed = 255;
NewObject->RGBGreen = 255;
NewObject->RGBBlue = 255;
// On ins?re dans l'avant dernier objet 3D la r?f?rence du nouvel objet 3D.
Object3DType *OldObject = Basic3D.LastCreatedObject;
OldObject->NextObject = NewObject;
// On ins?re le nouvel objet cr?e dans la structure de Basic3D.
Basic3D.LastCreatedObject = NewObject;
Basic3D.B3DObjectAmount++;
return NewObject;
}
void Free3DObject( Object3DType *OldObject ){
if ( OldObject != NULL ){
IExec -> FreeVec( OldObject );
}
}
void BASIC3D_Constructor( void ){
}
void BASIC3D_Destructor( void ){
// Suppression de tous les objets 3D existants restants.
if ( Basic3D.B3DObjectAmount > 0 ){
// On r?cup?re l'objet en m?moire en Basic3D
Object3DType *NewObject = Basic3D.LastCreatedObject;
do{
Basic3D.B3DObjectAmount--;
Object3DType *NextToDelete = NewObject->PreviousObject;
/* Free3DObject( *NewObject );*/
*NewObject = *NextToDelete;
} while ( !NewObject );
if ( Basic3D.B3DObjectAmount != NULL ){
// Afficher un message d'erreur si la quantit? d'objets restants est > 0 alors que la liste est vide.
}
}
}
|
|
|
|
Re: GCC, Dynamic structure creation method ?
|
Posted on: 2009/3/1 22:37
#69
|
Just popping in
|
@freddix
Can you paste in the entire struct?
|
|
|
|
Re: GCC, Dynamic structure creation method ?
|
Posted on: 2009/3/1 22:12
#70
|
Just popping in
|
@freddix I think this is wrong:
typedef struct Object3DType{
...
};
and should be:
typedef struct {
...
} Object3DType;
|
|
|
|
Re: TGE on Amiga
|
Posted on: 2009/2/26 22:53
#71
|
Just popping in
|
@Shadow No ETA. I am currently debugging network code, but debugging tools on the amiga are shashimi and IExec->DebugPrintF Unfortunetely even in single player mode the networking code is used. It does not send anything, but Torque is designed always to have a server and a client. I am looking into it but it is difficult.
|
|
|
|
Re: TGE on Amiga
|
Posted on: 2009/2/25 22:46
#72
|
Just popping in
|
@Shadow
And it is still alive, just moving very slowly :)
|
|
|
|
Re: OpenGL - Small Stars scroll 4 layers.
|
Posted on: 2009/2/16 23:30
#73
|
Just popping in
|
@freddix
char buf[256];
int i = 23043;
sprintf(buf, "%d", i);
|
|
|
|
Re: OpenGL - Small Stars scroll 4 layers.
|
Posted on: 2009/2/16 22:59
#74
|
Just popping in
|
@freddix
No then it works as expected, rendering is only done when you tell it to render with glutPostRedisplay.
|
|
|
|
Re: OpenGL - Small Stars scroll 4 layers.
|
Posted on: 2009/2/16 22:40
#75
|
Just popping in
|
@freddix
glutPostRedisplay tells glut to start rendering. glFlush empties the OpenGL command queue.
Idle function is always being called by GLUT while the rendering function is actually only called when something happens to the window eg. it is moved. I am not sure this is true for the amiga port of GLUT though.
Anyway because the rendering function is rarely called you should use the idle function to update your geometry and other stuff, then when that is done you use glutPostRedisplay to tell GLUT that now would be a good time to do some rendering.
Does that make sence?
|
|
|
|
Re: OpenGL - Small Stars scroll 4 layers.
|
Posted on: 2009/2/16 22:07
#76
|
Just popping in
|
@Shadow An other thing you should do was to change your idle function
/* OpenGL Sample #1
SStar scrolling with 4 parallaxs
*/
#include <GL/glut.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
float PosXY[256][2];
/* WHAT WE WANT TO DISPLAY ON SCREEN MUST BE ADDED IN THIS FUNCTION */
void My_glRendering( void )
{
int i;
glClearColor( 0.0, 0.0, 0.0, 0.0); /* Set backdrop as black */
glClear( GL_COLOR_BUFFER_BIT ); /* Clear the backdrop with glClearColor color */
glColor3f( 1.0, 1.0, 1.0 );
glBegin(GL_POINTS) ;
for( i = 00; i < 256 ; i++ ){
glVertex3f( PosXY[i][1], PosXY[i][2], 0.0f );
}
glEnd() ;
glFlush();
}
void My_IdleFunc( void)
{
int i, multiplier;
for( i = 0; i < 256 ; i++ ){
multiplier = i * 0.25f;
PosXY[i][1] -= ( 0.00001f * multiplier ) ;
if ( PosXY[i][1] < 0.0 )
PosXY[i][1] = 1.0;
}
glutPostRedisplay();
}
/* SOME INITIALIZATIONS HERE */
void My_glInit( void )
{
glMatrixMode( GL_PROJECTION );
glLoadIdentity() ;
glOrtho( 0.0, 1.0, 0.0, 1.0, -1.0, 1.0 );
}
/* MAIN C PROCEDURE STARTUP-SEQUENCE IS HERE */
int main(int argc, char** argv)
{
int i;
for( i = 1; i < 256 ; i++ ){
PosXY[i][1] = rand() % 100000 / 100000.0 ;
PosXY[i][2] = rand() % 100000 / 100000.0 ;
}
glutInit(&argc, argv); /* Initialize Glut */
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGBA); /* Define display mode properties such as single buffer, color mode and */
glutInitWindowSize( 640, 480 ); /* define the sizes of the window to create */
glutInitWindowPosition( 300, 300 );
glutCreateWindow("AmiDARK Test Window"); /* Create the final rendering window */
My_glInit();
glutDisplayFunc( My_glRendering );
glutIdleFunc( My_IdleFunc );
mglEnableSync(GL_TRUE );
glutMainLoop();
return 0;
}
|
|
|
|
Re: OpenGL - Small Stars scroll 4 layers.
|
Posted on: 2009/2/16 21:59
#77
|
Just popping in
|
@freddix Great, but since your are in the optimizing mood you should change:
multiplier = i / 4.0;
to:
multiplier = i * 0.25f;
Oh and by the way. You are looping to far, and accessing illegal memory. Your array has 256 element but you are accessing 257 elements (0-256), your break condition should be i < 256.
|
|
|
|
Re: OpenGL - Small Stars scroll 4 layers.
|
Posted on: 2009/2/16 21:38
#78
|
Just popping in
|
@freddix Very well done. But may I suggest the you move glBegin and glEnd outside the loop.
glBegin(GL_POINTS);
for(i = 0; i < points; ++i)
{
glVertex(x,y,z);
}
glEnd();
|
|
|
|
Re: LCD Montior Off on demand
|
Posted on: 2009/1/20 20:57
#79
|
Just popping in
|
@Slayer I still dont get it, what is wrong with the power button on the LCD??
|
|
|
|
Re: LCD Montior Off on demand
|
Posted on: 2009/1/20 11:26
#80
|
Just popping in
|
@Slayer If you are going to press a hotkey to activate the program that turns off the LDD, and then later do another action to terminate the program. Then the simplest solution would be to press the button on your LCD
|
|
|
|