Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 10 of 10

Thread: No problems

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2018

    Cool No problems

    hows that for a change?!? - I got no problems - AND YOU WONT EITHER -
    when you start out with correctly written examples !!!!!

    ///CREDITS -- win7 Mingw
    /// GLball
    /// openuniverse-1.0beta3.tar.gz
    ///example1.cpp --
    ///9/9/98 Paul Rademacher (

    ///Files to this project

    /// with png and tga support (tga implemented)

    /// v1.6.32 libpng.a BUILT using pnglibconf.h.prebuilt
    /// zlib1.dll

    ///#define GLUI_VERSION 2.36
    ///#include <GL/glui.h>///requires glut32.dll
    ///#define GLUT_API_VERSION 3.7

    /// printstring(2.5,-5,1,sbuf,2); 0-6 = 7 fonts included
    /// glui-master examples 1,4,5,6 built successfully

    ///being built correctly, there are no glui bugs
    ///no crashing or halting glutMainLoop();

    ///inspired from finding a barrage poor examples
    /// even glball was text-stuckon bgColor - fixed
    ///here is the definitive place to start with everything working
    Click image for larger version. 

Name:	scrcap.jpg 
Views:	13 
Size:	20.7 KB 
ID:	2718

  2. #2
    Junior Member Newbie
    Join Date
    Apr 2018


    left out default.txf, doh, now included.
    first.exe runs out of the box

    you see, there is a font engine, yet to implement completely,
    for labels in 3d space

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2018

    ortho text color bug

    I have some info on screen text color being in an unchangeable state !!

    Conditions ==

    if (info) scrinfo(0.9,1.0,0.9);

    if (atmosphere) {
    glEnable(GL_BLEND); ...

    and if (highdef)
    glBlendFunc(GL_SRC_ALPHA,GL_ONE); // black bg cloud map

    glball uses 16x16 slices/stacks for the gluSphere == black text

    64x32 == black text
    62x31 == ok but still blended
    60x30 == ok but still blended
    dont forget to get the textures that wont stay on site -- doh!!

  4. #4
    Junior Member Newbie
    Join Date
    Apr 2018
    I hope one day I'll get to this level whereas I will be able to make things more than just a triangle

  5. #5
    Junior Member Newbie
    Join Date
    Apr 2018
    you can get there !! and here's the example and some details for you
    I first noticed openUniverse around '98 - and noticed whats wrong about it --

    Im not asking, I'm explaining from 20 years experience, not a newbie ...

    top prority !! if you cannot translate RADEC to a 3D point and back again, you will forever be in the wrong place !!
    whether you calc and draw to a 2d screen or from "invisible openGL," IT'S THE SAME MATH if you just follow rules !!

    openuniverse is wrong -- see radec2pos() and eye2radec() in my example

    only difference for the openGL camera is THIS !!! INVERT camup
    void Camera(void)
    gluLookAt(0.0,0.0,0.0,cameye[0], cameye[1],

    and everything goes the right way - know the trig laws AND right-angle rules !!!

    sorry they wont leave textures on site, must be a free quota thing.

    currently you'll need to MAKE THESE MAPS - to run the exe
    char s[74] = "earth.tga eclouds.tga bigclouds.tga\0";

    transparent eclouds 4096
    blackBG bigclouds 8192 will make the tga files

  6. #6
    Junior Member Newbie
    Join Date
    Apr 2018

    Cool light vector

    also learning trial and error --3
    this looks like a position , right?
    glLightfv(GL_LIGHT1, GL_POSITION, light_position);

    well gluLookAt cant vector 000

    orbital(v,target); COPYVECTOR(v2,v); NORMALIZE(v2);
    /// light pos is a lightvector. if 0,0,0 glu doesnt move it.

    light_position[0] = -v2[0];
    light_position[1] = -v2[1];
    light_position[2] = -v2[2];
    glLightfv(GL_LIGHT1, GL_POSITION, light_position);

    lightvector TO > the sun
    not really a 'position'
    semantics makes learning harder
    like calling cameye center
    and the campos eye

    erase all that .. lol

  7. #7
    Junior Member Newbie
    Join Date
    Apr 2018
    added low res maps to the zip, so it will run without any work, duh, doh.

  8. #8
    Junior Member Newbie
    Join Date
    Apr 2018

    Cool the glu mystery

    the inspiration was the glu mystery -
    what you dont see behind your code is demonstrated and used in this program
    you have a cam matrix and a world matrix,

    and you turn cameye vector, the world matrix had better go in the opposite direction

    this is shown as invertmatrix(cam,inv-world)

    invert is perhaps not the best word, as it does not turn anything upside down.

    this is the heart of the "camera"

    there were many corrections and devs in 9 days - get the latest version, now 7

  9. #9
    Junior Member Newbie
    Join Date
    Apr 2018
    I have to take issue with a function found with glball --
    so if you go trying to learn, the hard way, this could help !!!
    /// can only be called like this,
    ///image_t temp_image;
    ///tgaLoad(n, &temp_image,

    /// not used, warning for p used unitialized
    /// and the fix is: * - &
    GLuint tgaLoadAndBind ( char *file_name, tgaFLAG mode )
    GLuint texture_id;
    /// image_t *p; // do not do this $8!L - HEED the warning!!
    image_t p;
    glGenTextures ( 1, &texture_id );
    glBindTexture ( GL_TEXTURE_2D, texture_id );

    if ( tgaLoadTheImage ( file_name, &p, mode ))
    /// tgaUploadImage ( p, mode );
    /// tgaFree ( p );
    // i dont know about this, p is not declared * pointer
    // as above tgaLoad()
    return texture_id;

    see loadTextures in mainworking.cpp

    Output file is bin\Release\first.exe with size 657.26 KB
    Process terminated with status 0 (0 minute(s), 6 second(s))
    0 error(s), 0 warning(s) (0 minute(s), 6 second(s))
    glut32.dll not needed at runtime.

  10. #10
    Junior Member Newbie
    Join Date
    Apr 2018

    acrobatic camera

    love this camera

    check it out

    select orbit cam
    take mouse off gui, back to main viewport
    left/right arrow to behind earth, on the dark side; get lined up
    now hit vector cam

    cam flies over the top with a graceful flip, awesome
    one of the really nice things OU had.

    annual orbit cam path inclination ...
    happy coding

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts