hello, opengl in a child dialog??? please help
heres the source http://apache.airnet.com.au/~praisegd/miscelanious/opengldialog.zip
ive searched about the forums to find the answer to my question, but alas i have not been able to find what i need.
my program consists of a main window and then 3 dialog''s ColourCombo,Dialog1 and DView
the DView dialog is a child of Dialog1
im using DView as my opengl window but it doesnt show, if i make the window a popup or an overlapped window it shows fine but doesnt stick to my larger window when i move it around the screen
the other problem im having is that even if i choose popup or overlapped, any geometry i create doesnt show in the window, even tho it seems to be working fine,,
im very new to the world of programming and would love some help on the subject
please if anyone can help, i really appreciate it
!!My bRaiN is FiLLEd With HappY Juice!!
!!My bRaiN is FiLLEd With HappY Juice!!
i know similar questions have been asked before regarding this matter, i would really appreciate anything anyone can tell me on this matter.
!!My bRaiN is FiLLEd With HappY Juice!!
!!My bRaiN is FiLLEd With HappY Juice!!
!!My bRaiN is FiLLEd With HappY Juice!!
i would just have a quick guess and say that nobody actually knows how to do this,
fi im right just say so, and i will post my worked out version sometime in the future
!!My bRaiN is FiLLEd With HappY Juice!!
fi im right just say so, and i will post my worked out version sometime in the future
!!My bRaiN is FiLLEd With HappY Juice!!
!!My bRaiN is FiLLEd With HappY Juice!!
Have you gone through Nehe''s tutorial #1 for creating an OpenGL window without any other dialogs?
If so, putting OpenGL in a child window is just that easy. In tutorial 1 you see a DC for the main window. Child windows have DCs too - just take that DC and pass it to wglCreateContext and voila, OpenGL.
I have several MFC samples on my site that do this.
Love means nothing to a tennis player
If so, putting OpenGL in a child window is just that easy. In tutorial 1 you see a DC for the main window. Child windows have DCs too - just take that DC and pass it to wglCreateContext and voila, OpenGL.
I have several MFC samples on my site that do this.
Love means nothing to a tennis player
My nothing-to-write-home-about OpenGL webpage. (please pardon the popups!)
Love means nothing to a tennis player
My nothing-to-write-home-about OpenGL webpage. (please pardon the popups!)
slightly off topic, but what is dview?
I do what DalTXColtsFan does. Use the Handle of different DC''s for different objects, that way I can render to Buttons, Edit boxes, Memo boxes or many other things on any form.
I do what DalTXColtsFan does. Use the Handle of different DC''s for different objects, that way I can render to Buttons, Edit boxes, Memo boxes or many other things on any form.
Beer - the love catalystgood ol' homepage
You should change your IDD_DVIEW dialog resource style from "POPUP" to "CHILD" and add the following line after the Dialogs creation:
Dialog = CreateDialog( hInstance,MAKEINTRESOURCE(IDD_DIALOG),hWnd,DialogProc);
DView = CreateDialog( hInstance, MAKEINTRESOURCE(IDD_DVIEW), Dialog, DViewProc);
ColourCombo = CreateDialog(hInstance,MAKEINTRESOURCE(IDD_COLOURCOMBO),hWnd,ColourComboProc);
+ SetWindowPos( DView, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
Because the static frame is hidding the DView
Daniel
http://perso.wanadoo.fr/wogl/
Dialog = CreateDialog( hInstance,MAKEINTRESOURCE(IDD_DIALOG),hWnd,DialogProc);
DView = CreateDialog( hInstance, MAKEINTRESOURCE(IDD_DVIEW), Dialog, DViewProc);
ColourCombo = CreateDialog(hInstance,MAKEINTRESOURCE(IDD_COLOURCOMBO),hWnd,ColourComboProc);
+ SetWindowPos( DView, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
Because the static frame is hidding the DView

Daniel
http://perso.wanadoo.fr/wogl/
It''s just like rendering into a window except with this code it is rendered into one of the dialog items, the edit text box.
Win32 API code
MAIN (This is the one you will be concerned with)
RESOURCE
RESOURCE IDs
You will be missing a resource the icon, replace it with another.
I can e-mail you the whole project plus sourcecode if you want to actually see the end result and you can''t get it to work.
Hope that helps.
Win32 API code
MAIN (This is the one you will be concerned with)
// windowopengl.cpp : Defines the entry point for the application.//#include "stdafx.h"#include "resource.h"#include <gl\glut.h>#include <gl\gl.h>#include <gl\glaux.h>#define MAX_LOADSTRING 100// Global Variables:HINSTANCE hInst; // current instanceTCHAR szTitle[MAX_LOADSTRING]; // The title bar textTCHAR szWindowClass[MAX_LOADSTRING]; // The title bar textint TheEnd; // Flag used by thread to end int xrot; // rotation// Foward declarations of functions included in this code module:ATOM MyRegisterClass(HINSTANCE hInstance);BOOL InitInstance(HINSTANCE, int);LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM);LRESULT CALLBACK OpenGL(HWND, UINT, WPARAM, LPARAM);DWORD WINAPI InitGL(HWND);int MySetPixelFormat(HDC hdc);void RenderScene(int);int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){ // TODO: Place code here. MSG msg; HACCEL hAccelTable; // Initialize global strings LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); LoadString(hInstance, IDC_WINDOWOPENGL, szWindowClass, MAX_LOADSTRING); MyRegisterClass(hInstance); // Perform application initialization: if (!InitInstance (hInstance, nCmdShow)) { return FALSE; } hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_WINDOWOPENGL); // Main message loop: while (GetMessage(&msg, NULL, 0, 0)) { if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } } return msg.wParam;}//// FUNCTION: MyRegisterClass()//// PURPOSE: Registers the window class.//// COMMENTS://// This function and its usage is only necessary if you want this code// to be compatible with Win32 systems prior to the ''RegisterClassEx''// function that was added to Windows 95. It is important to call this function// so that the application will get ''well formed'' small icons associated// with it.//ATOM MyRegisterClass(HINSTANCE hInstance){ WNDCLASSEX wcex; wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = (WNDPROC)WndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance = hInstance; wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_WINDOWOPENGL); wcex.hCursor = LoadCursor(NULL, IDC_ARROW); wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); wcex.lpszMenuName = (LPCSTR)IDC_WINDOWOPENGL; wcex.lpszClassName = szWindowClass; wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL); return RegisterClassEx(&wcex);}//// FUNCTION: InitInstance(HANDLE, int)//// PURPOSE: Saves instance handle and creates main window//// COMMENTS://// In this function, we save the instance handle in a global variable and// create and display the main program window.//BOOL InitInstance(HINSTANCE hInstance, int nCmdShow){ HWND hWnd; hInst = hInstance; // Store instance handle in our global variable hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL); if (!hWnd) { return FALSE; } ShowWindow(hWnd, nCmdShow); UpdateWindow(hWnd); return TRUE;}//// FUNCTION: WndProc(HWND, unsigned, WORD, LONG)//// PURPOSE: Processes messages for the main window.//// WM_COMMAND - process the application menu// WM_PAINT - Paint the main window// WM_DESTROY - post a quit message and return////LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam){ int wmId, wmEvent; PAINTSTRUCT ps; HDC hdc; TCHAR szHello[MAX_LOADSTRING]; LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING); switch (message) { case WM_COMMAND: wmId = LOWORD(wParam); wmEvent = HIWORD(wParam); // Parse the menu selections: switch (wmId) { case IDM_ABOUT: DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About); break; case IDM_EXIT: DestroyWindow(hWnd); break; case IDM_OPENGL: DialogBox(hInst, (LPCTSTR)IDD_OPENGL, hWnd, (DLGPROC)OpenGL); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } break; case WM_PAINT: hdc = BeginPaint(hWnd, &ps); // TODO: Add any drawing code here... RECT rt; GetClientRect(hWnd, &rt); DrawText(hdc, szHello, strlen(szHello), &rt, DT_CENTER); EndPaint(hWnd, &ps); break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } return 0;}// Mesage handler for about box.LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam){ switch (message) { case WM_INITDIALOG: return TRUE; case WM_COMMAND: if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) { EndDialog(hDlg, LOWORD(wParam)); return TRUE; } break; } return FALSE;}// Mesage handler for OpenGL box.LRESULT CALLBACK OpenGL(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam){ static HANDLE hOpenGL; static DWORD lpThreadId; switch (message) { case WM_INITDIALOG: return TRUE; case WM_COMMAND: if (LOWORD(wParam) == IDOK) { TheEnd=1; Sleep(500); EndDialog(hDlg, LOWORD(wParam)); return TRUE; } if (LOWORD(wParam) == IDRENDER) { EnableWindow(GetDlgItem(hDlg,IDRENDER),FALSE); hOpenGL=CreateThread(NULL,NULL,(LPTHREAD_START_ROUTINE)InitGL,hDlg,0,&lpThreadId); } break; } return FALSE;}// Here, we do the regular initialization of OpenGLDWORD WINAPI InitGL(HWND hDlg){ HDC hDC1,hDC2,hDC3,hDC4; HWND hEdit1,hEdit2,hEdit3,hEdit4; HGLRC hglrc1,hglrc2,hglrc3,hglrc4; // First, let''s get the handle to all the window we created in the Dialog // with the resource editor hEdit1=GetDlgItem(hDlg,IDC_EDIT1); hEdit2=GetDlgItem(hDlg,IDC_EDIT2); hEdit3=GetDlgItem(hDlg,IDC_EDIT3); hEdit4=GetDlgItem(hDlg,IDC_EDIT4); // For every window, we get the HDC hDC1=GetDC(hEdit1); hDC2=GetDC(hEdit2); hDC3=GetDC(hEdit3); hDC4=GetDC(hEdit4); // OpenGL Initialization glShadeModel(GL_SMOOTH); // Enable Smooth Shading glClearColor(0.0f, 0.0f, 0.0f, 0.5f); // Black Background glClearDepth(1.0f); // Depth Buffer Setup glEnable(GL_DEPTH_TEST); // Enables Depth Testing glDepthFunc(GL_LEQUAL); // The Type Of Depth Testing To Do glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); // Really Nice Perspective Calculations MySetPixelFormat(hDC1); MySetPixelFormat(hDC2); MySetPixelFormat(hDC3); MySetPixelFormat(hDC4); hglrc1 = wglCreateContext(hDC1); hglrc2 = wglCreateContext(hDC2); hglrc3 = wglCreateContext(hDC3); hglrc4 = wglCreateContext(hDC4); //render here while(TheEnd !=1 ) { // Select first Window as the rendering context and draw to it wglMakeCurrent(hDC1, hglrc1); RenderScene(1); SwapBuffers(hDC1); // Select second Window as the rendering context and draw to it wglMakeCurrent(hDC2, hglrc2); RenderScene(2); SwapBuffers(hDC2); // Select third Window as the rendering context and draw to it wglMakeCurrent(hDC3, hglrc3); RenderScene(2); SwapBuffers(hDC3); // Select fourth Window as the rendering context and draw to it wglMakeCurrent(hDC4, hglrc4); RenderScene(1); SwapBuffers(hDC4); // Throttle the loop. If we don''t put a sleep here, the thread will use 100% cpu Sleep(1); } wglMakeCurrent(NULL, NULL); // Cleanup ReleaseDC (hDlg, hDC1) ; ReleaseDC (hDlg, hDC2) ; ReleaseDC (hDlg, hDC3) ; ReleaseDC (hDlg, hDC4) ; wglDeleteContext(hglrc1); wglDeleteContext(hglrc2); wglDeleteContext(hglrc3); wglDeleteContext(hglrc4); return TRUE;}// Set up the pixel formatint MySetPixelFormat(HDC hdc){ PIXELFORMATDESCRIPTOR pfd = { sizeof(PIXELFORMATDESCRIPTOR), // size of this pfd 1, // version number PFD_DRAW_TO_WINDOW | // support window PFD_SUPPORT_OPENGL | // support OpenGL PFD_DOUBLEBUFFER, // double buffered PFD_TYPE_RGBA, // RGBA type 24, // 24-bit color depth 0, 0, 0, 0, 0, 0, // color bits ignored 0, // no alpha buffer 0, // shift bit ignored 0, // no accumulation buffer 0, 0, 0, 0, // accum bits ignored 32, // 32-bit z-buffer 0, // no stencil buffer 0, // no auxiliary buffer PFD_MAIN_PLANE, // main layer 0, // reserved 0, 0, 0 // layer masks ignored }; int iPixelFormat; // get the device context''s best, available pixel format match if((iPixelFormat = ChoosePixelFormat(hdc, &pfd)) == 0) { MessageBox(NULL, "ChoosePixelFormat Failed", NULL, MB_OK); return 0; } // make that match the device context''s current pixel format if(SetPixelFormat(hdc, iPixelFormat, &pfd) == FALSE) { MessageBox(NULL, "SetPixelFormat Failed", NULL, MB_OK); return 0; } return 1;}// This is where we render, in this case, we will draw a simple 3D-Trianglevoid RenderScene(int axis){ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); if(axis==1) glRotatef(xrot,1.0f,0.0f,0.0f); if(axis==2) glRotatef(xrot,0.0f,1.0f,0.0f); glBegin(GL_TRIANGLES); glColor3f(1, 0, 0); glVertex3f(0, 0.8f, 0); //top glColor3f(0, 1, 0); glVertex3f(-0.5, -0.5, 0.5); //left glColor3f(0, 0,1); glVertex3f(0.5, -0.5, 0.5); //right glColor3f(1.0f,0.0f,0.0f); // Red glVertex3f( 0.0f, 0.8f, 0.0f); // Top Of Triangle (Right) glColor3f(0.0f,0.0f,1.0f); // Blue glVertex3f( .5f,-.5f, .5f); // Left Of Triangle (Right) glColor3f(0.0f,0.5f,0.0f); // Green glVertex3f( 0.5f,-0.5f, -0.5f); // Right Of Triangle (Right) glColor3f(1.0f,0.0f,0.0f); // Red glVertex3f( 0.0f, 0.8f, 0.0f); // Top Of Triangle (Back) glColor3f(0.0f,1.0f,0.0f); // Green glVertex3f( 0.5f,-0.5f, -0.5f); // Left Of Triangle (Back) glColor3f(0.0f,0.0f,1.0f); // Blue glVertex3f(-0.5f,-0.5f, -0.5f); // Right Of Triangle (Back) glColor3f(1.0f,0.0f,0.0f); // Red glVertex3f( 0.0f, 0.8f, 0.0f); // Top Of Triangle (Left) glColor3f(0.0f,0.0f,1.0f); // Blue glVertex3f(-0.5f,-0.5f,-0.5f); // Left Of Triangle (Left) glColor3f(0.0f,1.0f,0.0f); // Green glVertex3f(-0.5f,-0.5f, 0.5f); // Right Of Triangle (Left) glEnd(); xrot+=1.5f;}
RESOURCE
//Microsoft Developer Studio generated resource script.//#include "resource.h"#define APSTUDIO_READONLY_SYMBOLS///////////////////////////////////////////////////////////////////////////////// Generated from the TEXTINCLUDE 2 resource.//#define APSTUDIO_HIDDEN_SYMBOLS#include "windows.h"#undef APSTUDIO_HIDDEN_SYMBOLS#include "resource.h"/////////////////////////////////////////////////////////////////////////////#undef APSTUDIO_READONLY_SYMBOLS/////////////////////////////////////////////////////////////////////////////// English (U.S.) resources#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)#ifdef _WIN32LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US#pragma code_page(1252)#endif //_WIN32///////////////////////////////////////////////////////////////////////////////// Icon//// Icon with lowest ID value placed first to ensure application icon// remains consistent on all systems.IDI_WINDOWOPENGL ICON DISCARDABLE "windowopengl.ICO"IDI_SMALL ICON DISCARDABLE "SMALL.ICO"///////////////////////////////////////////////////////////////////////////////// Menu//IDC_WINDOWOPENGL MENU DISCARDABLE BEGIN POPUP "&File" BEGIN MENUITEM "E&xit", IDM_EXIT END MENUITEM "&OpenGL", IDM_OPENGL POPUP "&Help" BEGIN MENUITEM "&About ...", IDM_ABOUT ENDEND///////////////////////////////////////////////////////////////////////////////// Accelerator//IDC_WINDOWOPENGL ACCELERATORS MOVEABLE PURE BEGIN "?", IDM_ABOUT, ASCII, ALT "/", IDM_ABOUT, ASCII, ALTEND///////////////////////////////////////////////////////////////////////////////// Dialog//IDD_ABOUTBOX DIALOG DISCARDABLE 22, 17, 230, 75STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENUCAPTION "About"FONT 8, "System"BEGIN ICON IDI_WINDOWOPENGL,IDC_MYICON,14,9,16,16 LTEXT "windowopengl Version 1.0",IDC_STATIC,49,10,119,8, SS_NOPREFIX LTEXT "Copyright (C) 2001",IDC_STATIC,49,20,119,8 DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_GROUPENDIDD_OPENGL DIALOG DISCARDABLE 0, 0, 304, 170STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENUCAPTION "Window OpenGL example by Chong Hin Ooi, chongooi@mediaone.net"FONT 8, "MS Sans Serif"BEGIN DEFPUSHBUTTON "Render",IDRENDER,190,149,50,14 PUSHBUTTON "OK",IDOK,247,149,50,14 EDITTEXT IDC_EDIT1,7,7,138,58,ES_AUTOHSCROLL EDITTEXT IDC_EDIT2,159,7,138,58,ES_AUTOHSCROLL EDITTEXT IDC_EDIT3,7,78,138,58,ES_AUTOHSCROLL EDITTEXT IDC_EDIT4,159,78,138,58,ES_AUTOHSCROLLEND#ifdef APSTUDIO_INVOKED///////////////////////////////////////////////////////////////////////////////// TEXTINCLUDE//2 TEXTINCLUDE DISCARDABLE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""resource.h""\r\n" "\0"END3 TEXTINCLUDE DISCARDABLE BEGIN "\r\n" "\0"END1 TEXTINCLUDE DISCARDABLE BEGIN "resource.h\0"END#endif // APSTUDIO_INVOKED///////////////////////////////////////////////////////////////////////////////// DESIGNINFO//#ifdef APSTUDIO_INVOKEDGUIDELINES DESIGNINFO DISCARDABLE BEGIN IDD_OPENGL, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 297 TOPMARGIN, 7 BOTTOMMARGIN, 163 ENDEND#endif // APSTUDIO_INVOKED///////////////////////////////////////////////////////////////////////////////// String Table//STRINGTABLE DISCARDABLE BEGIN IDS_APP_TITLE "windowopengl" IDS_HELLO "Window OpenGL example by Chong Hin Ooi" IDC_WINDOWOPENGL "WINDOWOPENGL"END#endif // English (U.S.) resources/////////////////////////////////////////////////////////////////////////////#ifndef APSTUDIO_INVOKED///////////////////////////////////////////////////////////////////////////////// Generated from the TEXTINCLUDE 3 resource.///////////////////////////////////////////////////////////////////////////////#endif // not APSTUDIO_INVOKED
RESOURCE IDs
//{{NO_DEPENDENCIES}}// Microsoft Developer Studio generated include file.// Used by windowopengl.rc//#define IDC_MYICON 2#define IDD_WINDOWOPENGL_DIALOG 102#define IDD_ABOUTBOX 103#define IDS_APP_TITLE 103#define IDM_ABOUT 104#define IDM_EXIT 105#define IDS_HELLO 106#define IDI_WINDOWOPENGL 107#define IDI_SMALL 108#define IDC_WINDOWOPENGL 109#define IDR_MAINFRAME 128#define IDD_OPENGL 129#define IDC_EDIT1 1000#define IDRENDER 1001#define IDC_EDIT2 1002#define IDC_EDIT3 1003#define IDC_EDIT4 1004#define IDM_OPENGL 32771#define IDC_STATIC -1// Next default values for new objects// #ifdef APSTUDIO_INVOKED#ifndef APSTUDIO_READONLY_SYMBOLS#define _APS_NEXT_RESOURCE_VALUE 130#define _APS_NEXT_COMMAND_VALUE 32772#define _APS_NEXT_CONTROL_VALUE 1002#define _APS_NEXT_SYMED_VALUE 110#endif#endif
You will be missing a resource the icon, replace it with another.
I can e-mail you the whole project plus sourcecode if you want to actually see the end result and you can''t get it to work.
Hope that helps.
quote:
Original post by danielbila
You should change your IDD_DVIEW dialog resource style from "POPUP" to "CHILD" and add the following line after the Dialogs creation:
Dialog = CreateDialog( hInstance,MAKEINTRESOURCE(IDD_DIALOG),hWnd,DialogProc);
DView = CreateDialog( hInstance, MAKEINTRESOURCE(IDD_DVIEW), Dialog, DViewProc);
ColourCombo = CreateDialog(hInstance,MAKEINTRESOURCE(IDD_COLOURCOMBO),hWnd,ColourComboProc);
+ SetWindowPos( DView, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
Because the static frame is hidding the DView
Daniel
http://perso.wanadoo.fr/wogl/
thankyou so much, i cant believe it was as simple as the static frame hiding my child window :O), your a legend danielbila thanks heaps, if you ever need some simple 3d models i will gladly try and help you
ok now all i have to get is some geometry to actually show up in the window which is never usually a problem, but for some reason its just not doing it
[edited by - TyKeiL on December 25, 2003 5:55:59 PM]
!!My bRaiN is FiLLEd With HappY Juice!!
ok ive updated the source a little
http://apache.airnet.com.au/~praisegd/miscelanious/opengldialog.zip
my cube isnt showing up.!!
now i found something curious which makes me confused, i havedefines 3 GLfloat''s as ColourR ColourG ColourB and made the keyboard modify those numbers "r""g""b" and also up and down arrows to change them all. but what i have found is that my program "remembers" what the old values of those humbers were so when i change them using my combo box they work fine but when i changes them after that using the up and down keys it resets there numbers to 0 and starts from there, which isnt technically correct, oops im rambling about something mostly unimportant,
its my cube i want to show up, can anyone help me please,,
this is what im going to be putting in the glwindow when im done
http://www.threedy.com/showthread.php?s=&threadid=13630
thankyou
!!My bRaiN is FiLLEd With HappY Juice!!
http://apache.airnet.com.au/~praisegd/miscelanious/opengldialog.zip
my cube isnt showing up.!!
now i found something curious which makes me confused, i havedefines 3 GLfloat''s as ColourR ColourG ColourB and made the keyboard modify those numbers "r""g""b" and also up and down arrows to change them all. but what i have found is that my program "remembers" what the old values of those humbers were so when i change them using my combo box they work fine but when i changes them after that using the up and down keys it resets there numbers to 0 and starts from there, which isnt technically correct, oops im rambling about something mostly unimportant,
its my cube i want to show up, can anyone help me please,,
this is what im going to be putting in the glwindow when im done
http://www.threedy.com/showthread.php?s=&threadid=13630
thankyou
!!My bRaiN is FiLLEd With HappY Juice!!
!!My bRaiN is FiLLEd With HappY Juice!!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement