Jump to content
  • Advertisement

ibranext

Member
  • Content Count

    15
  • Joined

  • Last visited

Everything posted by ibranext

  1. Hi, I'm wondering if anyone wants to help me out for a couple minuts to set up SDL via Join.me ? I spent 2 days trying to figure out what my problems are like: "the path you entered seems valid but this wizard can't locate the following SDL's include file 'SDL.h' in it"
  2. ibranext

    OpenGL/SDL C++

    I figured out its a bug and I did what you said, thx :)
  3. ibranext

    OpenGL/SDL C++

    - Bump :( -
  4. Hello, I need a little help, I'm trying to launch my OpenGL program with SDL, but It never worked, I followed over 4 tutorials but nothing worked, I  managed to land on only 1 error but that error says: .. .. 1>------ Build started: Project: OpenGLProject, Configuration: Debug Win32 ------ 1> main.cpp 1>c:\projects\opengl\project 2\openglproject\openglproject\main.cpp(2): fatal error C1083: Cannot open include file: 'SDL.h': No such file or directory ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== .. .. I tried to search it up many times but I got no decent results. Also I did include the SDL 2.0.3 .h/.dll/.lib files in the correct places. .. Any help will be great!
  5. ibranext

    SDL for OpenGL

    #include <iostream> #include <SDL.h> int main(int argc, char **argv){ if (SDL_Init(SDL_INIT_EVERYTHING) != 0){ std::cout << "SDL_Init Error: " << SDL_GetError() << std::endl; return 1; } SDL_Quit(); return 0; } Here is the code, I am using Visual C++ 2010.   EDIT: Well, that simple peace of code is not functional, so all my my code is kind of useless until I fix it.
  6. ibranext

    Black screen of DOOM!

    Wow, thanks; I think that link will be helpfull. I found some new things on it.
  7. Hi again! It's me and my second post Anyways, I would Like some help to resolve a little problem, Infact It's a bug not an error.   See the problem is that my code can compile/build and run but no 3D Blender object is shown. #include "stdafx.h" //VC++ Must have this ELSE error. #include <stdarg.h> #include <math.h> #include <iostream> #include <fstream> #include <sstream> #include <string> #include <vector> #include <GL/glut.h> using namespace std; void display(); void specialKeys(); float stringToDouble(string& s); vector<string> explode(const string& str,const char& ch); double rotate_y=0; double rotate_x=0; void display(){ float x,y,z; string v; string a,b,c; glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); glLoadIdentity(); /**perform object rotation using keyboard arrows in specialKeys function**/ glRotatef( rotate_x, 1.0, 0.0, 0.0 ); glRotatef( rotate_y, 0.0, 1.0, 0.0 ); ifstream myfile("test.obj"); // open file if (myfile.is_open()) { while ( myfile.good()) { string line; getline (myfile,line); // get current line vector<string> subs; subs=explode(line,' '); //explode line by space v=subs[0]; if (v == "v") { // This = True /***draw polygon***/ glBegin(GL_POLYGON); a=subs[1]; b=subs[2]; c=subs[3]; x=stringToDouble(a); y=stringToDouble(b); z=stringToDouble(c); /****draw 3D vertex*****/ glVertex3f(x,y,z); glEnd(); } } } myfile.close(); //close file glFlush(); glutSwapBuffers(); } /**** special key***/ void specialKeys( int key, int x, int y ) { if (key == GLUT_KEY_RIGHT) rotate_y += 5; else if (key == GLUT_KEY_LEFT) rotate_y -= 5; else if (key == GLUT_KEY_UP) rotate_x += 5; else if (key == GLUT_KEY_DOWN) rotate_x -= 5; glutPostRedisplay(); } /*** main***/ int main(int argc, char* argv[]){ glutInit(&argc,argv); glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); glutCreateWindow("Object"); glEnable(GL_DEPTH_TEST); glutDisplayFunc(display); glutSpecialFunc(specialKeys); glutMainLoop(); return 0; } /**converts string to double***/ float stringToDouble(string& s ) { std::istringstream i(s); float x; if (!(i >> x)) return 0; return x; } /***Explode : exploding strings***/ vector<string> explode(const string& str, const char& ch) { string next; vector<string> result; // For each character in the string for (string::const_iterator it = str.begin(); it != str.end(); it++) { // If we've hit the terminal character if (*it == ch) { // If we have some characters accumulated if (!next.empty()) { // Add them to the result vector result.push_back(next); next.clear(); } } else { next += *it; } } if (!next.empty()) result.push_back(next); return result; } By the way I think this test.obj file is important too... (I'm not quite sure how to use it ) ... Here it is..... # Blender v2.71 (sub 0) OBJ File: 'untitled.blend' # www.blender.org mtllib test.mtl o Cube v 1.000000 -1.000000 -1.000000 v 1.000000 -1.000000 1.000000 v -1.000000 -1.000000 1.000000 v -1.000000 -1.000000 -1.000000 v 1.000000 1.000000 -0.999999 v 0.999999 1.000000 1.000001 v -1.000000 1.000000 1.000000 v -1.000000 1.000000 -1.000000 usemtl Material s off f 1 2 3 4 f 5 8 7 6 f 1 5 6 2 f 2 6 7 3 f 3 7 8 4 f 5 1 4 8 Maby you can see that it is a simple cube .   Anyways, I hope you can help, thanks!
  8. ibranext

    Black screen of DOOM!

    Thanks for the help But I don't think I will be using this code anymore due to the advice you guys game me. I now find that this is not a correctly formed code, any links on how to make a correct one? All I found is a good video but it was on linux, I also found some totorials but they were incompleet or unsatisfactory.
  9. Hi, this will be my first post on the forums, and certainly not the last. I have placed the .dll/.lib/.h in the correct environment and attempted to build/compile this code: // Not made by me... // C++ | VC++ | OpenGL | I need help #pragma comment(linker, "/subsystem:windows") #include <windows.h> #include <gl/gl.h> #include <gl/glu.h> #include <gl/glaux.h> /* Here we find a few global variables. While i don't really like to use global variables, i found them very handy for this particular program. These variables will control angles, fullscreen, and the global device context. */ HDC g_HDC; float angle = 0.0f; float legAngle[2] = {0.0f, 0.0f}; float armAngle[2] = {0.0f, 0.0f}; bool fullScreen = false; /* Function: DrawCube Purpose: As the name would suggest, this is the function for drawing the cubes. */ void DrawCube(float xPos, float yPos, float zPos) { glPushMatrix(); glBegin(GL_POLYGON); /* This is the top face*/ glVertex3f(0.0f, 0.0f, 0.0f); glVertex3f(0.0f, 0.0f, -1.0f); glVertex3f(-1.0f, 0.0f, -1.0f); glVertex3f(-1.0f, 0.0f, 0.0f); /* This is the front face*/ glVertex3f(0.0f, 0.0f, 0.0f); glVertex3f(-1.0f, 0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 0.0f); glVertex3f(0.0f, -1.0f, 0.0f); /* This is the right face*/ glVertex3f(0.0f, 0.0f, 0.0f); glVertex3f(0.0f, -1.0f, 0.0f); glVertex3f(0.0f, -1.0f, -1.0f); glVertex3f(0.0f, 0.0f, -1.0f); /* This is the left face*/ glVertex3f(-1.0f, 0.0f, 0.0f); glVertex3f(-1.0f, 0.0f, -1.0f); glVertex3f(-1.0f, -1.0f, -1.0f); glVertex3f(-1.0f, -1.0f, 0.0f); /* This is the bottom face*/ glVertex3f(0.0f, 0.0f, 0.0f); glVertex3f(0.0f, -1.0f, -1.0f); glVertex3f(-1.0f, -1.0f, -1.0f); glVertex3f(-1.0f, -1.0f, 0.0f); /* This is the back face*/ glVertex3f(0.0f, 0.0f, 0.0f); glVertex3f(-1.0f, 0.0f, -1.0f); glVertex3f(-1.0f, -1.0f, -1.0f); glVertex3f(0.0f, -1.0f, -1.0f); glEnd(); glPopMatrix(); } /* Function: DrawArm Purpose: This function draws the arm for the robot. */ void DrawArm(float xPos, float yPos, float zPos) { glPushMatrix(); /* Sets color to red*/ glColor3f(1.0f, 0.0f, 0.0f); glTranslatef(xPos, yPos, zPos); /* Creates 1 x 4 x 1 cube*/ glScalef(1.0f, 4.0f, 1.0f); DrawCube(0.0f, 0.0f, 0.0f); glPopMatrix(); } /* Function: DrawHead Purpose: This function will create the head for the robot. */ void DrawHead(float xPos, float yPos, float zPos) { glPushMatrix(); /* Sets color to white*/ glColor3f(1.0f, 1.0f, 1.0f); glTranslatef(xPos, yPos, zPos); /* Creates 2 x 2 x 2 cube*/ glScalef(2.0f, 2.0f, 2.0f); DrawCube(0.0f, 0.0f, 0.0f); glPopMatrix(); } /* Function: DrawTorso Purpose: Function will do as suggested and draw a torso for our robot. */ void DrawTorso(float xPos, float yPos, float zPos) { glPushMatrix(); /* Sets color to blue*/ glColor3f(0.0f, 0.0f, 1.0f); glTranslatef(xPos, yPos, zPos); /* Creates 3 x 5 x 1 cube*/ glScalef(3.0f, 5.0f, 1.0f); DrawCube(0.0f, 0.0f, 0.0f); glPopMatrix(); } /* Function: DrawLeg Purpose: Not to sound repetitve, but as suggested this function will draw our robots legs. */ void DrawLeg(float xPos, float yPos, float zPos) { glPushMatrix(); /* Sets color to yellow*/ glColor3f(1.0f, 1.0f, 0.0f); glTranslatef(xPos, yPos, zPos); /* Creates 1 x 5 x 1 cube*/ glScalef(1.0f, 5.0f, 1.0f); DrawCube(0.0f, 0.0f, 0.0f); glPopMatrix(); } /* Function: DrawRobot Purpose: Function to draw our entire robot */ void DrawRobot(float xPos, float yPos, float zPos) { /* Variables for state of robots legs. True means the leg is forward, and False means the leg is back. The same applies to the robots arm states. */ static bool leg1 = true; static bool leg2 = false; static bool arm1 = true; static bool arm2 = false; glPushMatrix(); /* This will draw our robot at the desired coordinates. */ glTranslatef(xPos, yPos, zPos); /* These three lines will draw the various components of our robot. */ DrawHead(1.0f, 2.0f, 0.0f); DrawTorso(1.5f, 0.0f, 0.0f); glPushMatrix(); /* If the arm is moving forward we will increase the angle; otherwise, we will decrease the angle. */ if (arm1) { armAngle[0] = armAngle[0] + 1.0f; } else { armAngle[0] = armAngle[0] - 1.0f; } /* Once the arm has reached its max angle in one direction, we want it to reverse and change direction. */ if (armAngle[0] >= 15.0f) { arm1 = false; } if (armAngle[0] <= 15.0f) { arm1 = true; } /* Here we are going to move the arm away from the torso and rotate. This will create a walking effect. */ glTranslatef(0.0f, -0.5f, 0.0f); glRotatef(armAngle[0], 1.0f, 0.0f, 0.0f); DrawArm(2.5f, 0.0f, -0.5f); glPopMatrix(); glPushMatrix(); /* If the arm is moving forward we will increase the angle, otherwise we will decrease the angle */ if (arm2) { armAngle[1] = armAngle[1] + 1.0f; } else { armAngle[1] = armAngle[1] - 1.0f; } /* Here we are going to move the arm away from the torso and rotate. This will create a walking effect. */ glTranslatef(0.0f, -0.5f, 0.0f); glRotatef(armAngle[1], 1.0f, 0.0f, 0.0f); DrawArm(-1.5f, 0.0f, -0.5f); glPopMatrix(); /* Now its time to rotate the legs relative to the robots position in the world, this is the first leg, ie the right one. */ glPushMatrix(); /* If the leg is moving forward we will increase the angle; otherwise, we will decrease the angle. */ if (leg1) { legAngle[0] = legAngle[0] + 1.0f; } else { legAngle[0] = legAngle[0] - 1.0f; } /* Once the leg has reached its max angle in one direction, we want it to reverse and change direction. */ if (legAngle[0] >= 15.0f) { leg1 = false; } if (legAngle[0] <= -15.0f) { leg1 = true; } /* Here we are going to move the leg away from the torso and rotate. This will create a walking effect. */ glTranslatef(0.0f, -0.5f, 0.0f); glRotatef(legAngle[0], 1.0f, 0.0f, 0.0f); /* Time to draw the leg. */ DrawLeg(-0.5f, -5.0f, -0.5f); glPopMatrix(); /* Same as above, for the left leg. */ glPushMatrix(); /* If the leg is moving forward we will increase the angle, otherwise we will decrease the angle */ if (leg2) { legAngle[1] = legAngle[1] + 1.0f; } else { legAngle[1] = legAngle[1] - 1.0f; } /* Once the leg has reached its max angle in one direction, we want it to reverse and change direction. */ if (legAngle[1] >= 15.0f) { leg2 = false; } if (legAngle[1] <= -15.0f) { leg2 = true; } /* Here we are going to move the leg away from the torso and rotate. This will create a walking effect. */ glTranslatef(0.0f, -0.5f, 0.0f); glRotatef(legAngle[1], 1.0f, 0.0f, 0.0f); DrawLeg(1.5f, -5.0f, -0.5f); glPopMatrix(); glPopMatrix(); } /* Function: Render Purpose: This function will be responsible for the rendering, got to love my descriptive function names : ) */ void Render() { /* Enable depth testing */ glEnable(GL_DEPTH_TEST); /* Heres our rendering. Clears the screen to black, clear the color and depth buffers, and reset our modelview matrix. */ glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); /* Increase rotation angle counter */ angle = angle + 1.0f; /* Reset after we have completed a circle */ if (angle >= 360.0f) { angle = 0.0f; } glPushMatrix(); glLoadIdentity(); /* Move to 0,0,-30 , rotate the robot on its y axis, draw the robot, and dispose of the current matrix. */ glTranslatef(0.0f, 0.0f, -30.0f); glRotatef(angle, 0.0f, 1.0f, 0.0f); DrawRobot(0.0f, 0.0f, 0.0f); glPopMatrix(); glFlush(); /* Bring back buffer to foreground */ SwapBuffers(g_HDC); } //function to set the pixel format for the device context /* Function: SetupPixelFormat Purpose: This function will be responsible for setting the pixel format for the device context. */ void SetupPixelFormat(HDC hDC) { /* Pixel format index */ int nPixelFormat; static PIXELFORMATDESCRIPTOR pfd = { sizeof(PIXELFORMATDESCRIPTOR), //size of structure 1, //default version PFD_DRAW_TO_WINDOW | //window drawing support PFD_SUPPORT_OPENGL | //opengl support PFD_DOUBLEBUFFER, //double buffering support PFD_TYPE_RGBA, //RGBA color mode 32, //32 bit color mode 0, 0, 0, 0, 0, 0, //ignore color bits 0, //no alpha buffer 0, //ignore shift bit 0, //no accumulation buffer 0, 0, 0, 0, //ignore accumulation bits 16, //16 bit z-buffer size 0, //no stencil buffer 0, //no aux buffer PFD_MAIN_PLANE, //main drawing plane 0, //reserved 0, 0, 0 }; //layer masks ignored /* Choose best matching format*/ nPixelFormat = ChoosePixelFormat(hDC, &pfd); /* Set the pixel format to the device context*/ SetPixelFormat(hDC, nPixelFormat, &pfd); } /* Windows Event Procedure Handler */ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { /* Rendering and Device Context variables are declared here. */ static HGLRC hRC; static HDC hDC; /* Width and Height for the window our robot is to be displayed in. */ int width, height; switch(message) { case WM_CREATE: //window being created hDC = GetDC(hwnd); //get current windows device context g_HDC = hDC; SetupPixelFormat(hDC); //call our pixel format setup function /* Create rendering context and make it current */ hRC = wglCreateContext(hDC); wglMakeCurrent(hDC, hRC); return 0; break; case WM_CLOSE: //window is closing /* Deselect rendering context and delete it*/ wglMakeCurrent(hDC, NULL); wglDeleteContext(hRC); /* Send quit message to queue*/ PostQuitMessage(0); return 0; break; case WM_SIZE: /* Retrieve width and height*/ height = HIWORD(lParam); width = LOWORD(lParam); /* Don't want a divide by 0*/ if (height == 0) { height = 1; } /* Reset the viewport to new dimensions*/ glViewport(0, 0, width, height); /* Set current Matrix to projection*/ glMatrixMode(GL_PROJECTION); glLoadIdentity(); //reset projection matrix /* Time to calculate aspect ratio of our window. */ gluPerspective(54.0f, (GLfloat)width/(GLfloat)height, 1.0f, 1000.0f); glMatrixMode(GL_MODELVIEW); //set modelview matrix glLoadIdentity(); //reset modelview matrix return 0; break; default: break; } return (DefWindowProc(hwnd, message, wParam, lParam)); } int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { WNDCLASSEX windowClass; //window class HWND hwnd; //window handle MSG msg; //message bool done; //flag for completion of app DWORD dwExStyle; //window extended style DWORD dwStyle; //window style RECT windowRect; /* Screen/display attributes*/ int width = 800; int height = 600; int bits = 32; windowRect.left =(long)0; //set left value to 0 windowRect.right =(long)width; //set right value to requested width windowRect.top =(long)0; //set top value to 0 windowRect.bottom =(long)height;//set bottom value to requested height /* Fill out the window class structure*/ windowClass.cbSize = sizeof(WNDCLASSEX); windowClass.style = CS_HREDRAW | CS_VREDRAW; windowClass.lpfnWndProc = WndProc; windowClass.cbClsExtra = 0; windowClass.cbWndExtra = 0; windowClass.hInstance = hInstance; windowClass.hIcon = LoadIcon(NULL, IDI_APPLICATION); windowClass.hCursor = LoadCursor(NULL, IDC_ARROW); windowClass.hbrBackground = NULL; windowClass.lpszMenuName = NULL; windowClass.lpszClassName = "MyClass"; windowClass.hIconSm = LoadIcon(NULL, IDI_WINLOGO); /* Register window class*/ if (!RegisterClassEx(&windowClass)) { return 0; } /* Check if fullscreen is on*/ if (fullScreen) { DEVMODE dmScreenSettings; memset(&dmScreenSettings, 0, sizeof(dmScreenSettings)); dmScreenSettings.dmSize = sizeof(dmScreenSettings); dmScreenSettings.dmPelsWidth = width; //screen width dmScreenSettings.dmPelsHeight = height; //screen height dmScreenSettings.dmBitsPerPel = bits; //bits per pixel dmScreenSettings.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT; if (ChangeDisplaySettings(&dmScreenSettings, CDS_FULLSCREEN != DISP_CHANGE_SUCCESSFUL)) { /* Setting display mode failed, switch to windowed*/ MessageBox(NULL, "Display mode failed", NULL, MB_OK); fullScreen = false; } } /* Check if fullscreen is still on*/ if (fullScreen) { dwExStyle = WS_EX_APPWINDOW; //window extended style dwStyle = WS_POPUP; //windows style ShowCursor(FALSE); //hide mouse pointer } else { dwExStyle = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE; //window extended style dwStyle = WS_OVERLAPPEDWINDOW; //windows style } AdjustWindowRectEx(&windowRect, dwStyle, FALSE, dwExStyle); /* Class registerd, so now create our window*/ hwnd = CreateWindowEx(NULL, "MyClass", //class name "OpenGL Robot", //app name dwStyle | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, 0, 0, //x and y coords windowRect.right - windowRect.left, windowRect.bottom - windowRect.top,//width, height NULL, //handle to parent NULL, //handle to menu hInstance, //application instance NULL); //no xtra params /* Check if window creation failed (hwnd = null ?)*/ if (!hwnd) { return 0; } ShowWindow(hwnd, SW_SHOW); //display window UpdateWindow(hwnd); //update window done = false; //initialize loop condition variable /* Main message loop*/ while (!done) { PeekMessage(&msg, hwnd, NULL, NULL, PM_REMOVE); if (msg.message == WM_QUIT) //did we receive a quit message? { done = true; } else { Render(); TranslateMessage(&msg); DispatchMessage(&msg); } } if (fullScreen) { ChangeDisplaySettings(NULL, 0); ShowCursor(TRUE); } return msg.wParam; } and of course I'm here asking for help since I have gotten these errors: 1>------ Build started: Project: OpenGLProject, Configuration: Debug Win32 ------ 1> main.cpp 1>c:\users\x200\documents\visual studio 2010\projects\openglproject\openglproject\main.cpp(29): warning C4627: '#include <gl/gl.h>': skipped when looking for precompiled header use 1> Add directive to 'StdAfx.h' or rebuild precompiled header 1>c:\users\x200\documents\visual studio 2010\projects\openglproject\openglproject\main.cpp(30): warning C4627: '#include <gl/glu.h>': skipped when looking for precompiled header use 1> Add directive to 'StdAfx.h' or rebuild precompiled header 1>c:\users\x200\documents\visual studio 2010\projects\openglproject\openglproject\main.cpp(31): warning C4627: '#include <gl/glaux.h>': skipped when looking for precompiled header use 1> Add directive to 'StdAfx.h' or rebuild precompiled header 1>c:\users\x200\documents\visual studio 2010\projects\openglproject\openglproject\main.cpp(662): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "StdAfx.h"' to your source? ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== Any help will be nice. Thanks.
  10. ibranext

    C++ errors for the past days...

    Yeeh, I was In a Chatroom and a guy helped me fix it, but thanks :)
  11. ibranext

    C++ errors for the past days...

    Any more help will be appreciated. 
  12. ibranext

    C++ errors for the past days...

    Very sorry, I am fairly new to OpenGL and Visual Studios, I usually use DEV C++ so I am not sure where I can find  "WinMain", also; I only have one #include <...> of every sort, I have checked to make sure.
  13. ibranext

    C++ errors for the past days...

    Yep, did that for all the texts thanks, but I finally hit this error witch dose not give any hint on were the error is. 1>------ Build started: Project: OpenGLProject, Configuration: Debug Win32 ------ 1> main.cpp 1>OpenGLProject.obj : error LNK2005: "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z) already defined in main.obj 1>LINK : warning LNK4067: ambiguous entry point; selected 'WinMainCRTStartup' 1>c:\users\x200\documents\visual studio 2010\Projects\OpenGLProject\Debug\OpenGLProject.exe : fatal error LNK1169: one or more multiply defined symbols found ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  14. ibranext

    C++ errors for the past days...

    NVM, I narrowed down to one error: 1>------ Build started: Project: OpenGLProject, Configuration: Debug Win32 ------ 1> main.cpp 1>c:\users\x200\documents\visual studio 2010\projects\openglproject\openglproject\main.cpp(623): error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [8]' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== Any ideas?
  15. ibranext

    C++ errors for the past days...

    So, I must ad: #include <stdafx.h> Right? #include <stdafx.h> #pragma comment(linker, "/subsystem:windows")  but now It gives me these errors... 1>------ Build started: Project: OpenGLProject, Configuration: Debug Win32 ------ 1> main.cpp 1>c:\users\x200\documents\visual studio 2010\projects\openglproject\openglproject\main.cpp(566): error C2440: '=' : cannot convert from 'const char [8]' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\x200\documents\visual studio 2010\projects\openglproject\openglproject\main.cpp(590): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [20]' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\x200\documents\visual studio 2010\projects\openglproject\openglproject\main.cpp(623): error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [8]' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== =/
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!