Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Guybrush Threepwood

User
  • Registriert

  • Letzter Besuch

Alle Beiträge von Guybrush Threepwood

  1. So ich hab gestern noch mal rumprobiert und wenn ich die Struktur so ändere: CUSTOMVERTEX vertices[] = { { 250.0f, 50.0f, 0.5f, 1.0f, 0xffff0000, }, // x, y, z, rhw, color { 250.0f, 250.0f, 0.5f, 1.0f, 0xff00ff00, }, { 50.0f, 250.0f, 0.5f, 1.0f, 0xff00ffff, }, }; habe ich 2 Dreiecke. Wenn ich 1 Element entferne und dann auch 2*sizeof() schreibe, wird nichts dargestellt (was glaube ich auch verständlich ist), aber wenn ich noch ein Element hinzufüge und 4*sizeof() schreibe, bekomme ich trotzdem das selbe Dreieck:confused:
  2. Du mußt so oder so bis Morgen warten, weil ich zu Hause keinen Internetzugang habe:p
  3. Ja hatte ich eh vor. Weil mir kam noch die Idee das ich bei CreateVertexBuffer() dann auch anstatt 3*sizeof(), 2*sizeof() schreiben könnte/sollte.
  4. Also ich hab die Werte nicht mehr im Kopf und ich kanns hier auch leider nicht ausprobieren weil ich das Direct X 9 SDK hier nicht habe. Ok hier ist mal der ganze Code: #include <windows.h> #include <d3d9.h> LRESULT CALLBACK MainProc(HWND,UINT,WPARAM,LPARAM); HRESULT InitD3D(); HRESULT InitVB(); HRESULT Render(); struct GLOBALS { HWND hMainWindow; IDirect3D9* pD3D; IDirect3DDevice9* pd3dDevice; IDirect3DVertexBuffer9* pVB; }g_={0,0,0,0}; struct CUSTOMVERTEX { FLOAT x, y, z, rhw; // The transformed position for the vertex DWORD color; // The vertex color }; APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int nCmdShow) { MSG Msg; WNDCLASS wc; memset(&wc,0,sizeof(WNDCLASS)); wc.hCursor = LoadCursor(0,IDC_ARROW); wc.hInstance = hInstance; wc.lpfnWndProc = MainProc; wc.lpszClassName = "D3D Test"; if (!RegisterClass(&wc)) return FALSE; g_.hMainWindow = CreateWindow("D3D Test","D3D Test", WS_OVERLAPPEDWINDOW, 300,300, 350,300, GetDesktopWindow(),0, hInstance,0); ShowWindow(g_.hMainWindow,nCmdShow); UpdateWindow(g_.hMainWindow); if (InitD3D() != S_OK) { MessageBox(g_.hMainWindow,"Fehler","D3D Test",MB_APPLMODAL); } InitVB(); while(Msg.message != WM_QUIT) { if(PeekMessage(&Msg,NULL,0,0,PM_REMOVE)) { TranslateMessage(&Msg); DispatchMessage(&Msg); } else Render(); } UnregisterClass("D3D Test",hInstance); return Msg.wParam; } LRESULT CALLBACK MainProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { switch (Msg) { case WM_DESTROY: { if (g_.pVB != NULL) g_.pVB->Release(); if (g_.pd3dDevice != NULL) g_.pd3dDevice->Release(); if (g_.pD3D != NULL) g_.pD3D->Release(); PostQuitMessage(0); return 0; } default: return DefWindowProc(hWnd,Msg,wParam,lParam); } } HRESULT InitD3D() { D3DPRESENT_PARAMETERS d3dpp; memset(&d3dpp,0,sizeof(D3DPRESENT_PARAMETERS)); d3dpp.Windowed = TRUE; d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; d3dpp.BackBufferFormat = D3DFMT_UNKNOWN; d3dpp.EnableAutoDepthStencil = TRUE; d3dpp.AutoDepthStencilFormat = D3DFMT_D16; g_.pD3D = Direct3DCreate9(D3D_SDK_VERSION); if (g_.pD3D == NULL) { return E_FAIL; } if (g_.pD3D->CreateDevice(D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL, g_.hMainWindow, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp,&g_.pd3dDevice) != D3D_OK) { return E_FAIL; } return S_OK; } HRESULT InitVB() { // Initialize three vertices for rendering a triangle CUSTOMVERTEX vertices[] = { { 150.0f, 50.0f, 0.5f, 1.0f, 0xffff0000, }, // x, y, z, rhw, color { 250.0f, 250.0f, 0.5f, 1.0f, 0xff00ff00, }, { 50.0f, 250.0f, 0.5f, 1.0f, 0xff00ffff, }, }; // Create the vertex buffer. Here we are allocating enough memory // (from the default pool) to hold all our 3 custom vertices. We also // specify the FVF, so the vertex buffer knows what data it contains. if( FAILED( g_.pd3dDevice->CreateVertexBuffer( 3*sizeof(CUSTOMVERTEX), 0, D3DFVF_XYZRHW|D3DFVF_DIFFUSE, D3DPOOL_DEFAULT, &g_.pVB, NULL ) ) ) { return E_FAIL; } // Now we fill the vertex buffer. To do this, we need to Lock() the VB to // gain access to the vertices. This mechanism is required becuase vertex // buffers may be in device memory. VOID* pVertices; if( FAILED( g_.pVB->Lock( 0, sizeof(vertices), (void**)&pVertices, 0 ) ) ) return E_FAIL; memcpy( pVertices, vertices, sizeof(vertices) ); g_.pVB->Unlock(); return S_OK; } HRESULT Render() { g_.pd3dDevice->Clear(0,NULL,D3DCLEAR_TARGET,D3DCOLOR_XRGB(0,0,255),1.0f,0); if( SUCCEEDED( g_.pd3dDevice->BeginScene() ) ) { g_.pd3dDevice->SetStreamSource( 0, g_.pVB, 0, sizeof(CUSTOMVERTEX) ); g_.pd3dDevice->SetFVF(D3DFVF_XYZRHW|D3DFVF_DIFFUSE); g_.pd3dDevice->DrawPrimitive( D3DPT_TRIANGLELIST, 0, 1 ); g_.pd3dDevice->EndScene(); } g_.pd3dDevice->Present(NULL,NULL,NULL,NULL ); return S_OK; } [/PHP]
  5. Hi, kann mir einer von euch sagen welche Versionen des Internet Explorers standartmäßig bei den verschiedenen Windowsversionen dabei sind? Also bei: Win95 Win98 WinME WinXP WinNT Win2000 Gruß Guybrush
  6. Hi, ich ´hab mir in der letzten Zeit mal ein paar Direct3D 9 Tutoriols angeschaut, aber ich verstehe nie wie die Vertexstrukter aufgebaut werden muß um eine bestimmte Form zu erzielen. Folgende Struktur liefert z.B. ein Buntes Dreieck: CUSTOMVERTEX vertices[] = { { 150.0f, 50.0f, 0.5f, 1.0f, 0xffff0000, }, // x, y, z, rhw, color { 250.0f, 250.0f, 0.5f, 1.0f, 0xff00ff00, }, { 50.0f, 250.0f, 0.5f, 1.0f, 0xff00ffff, }, }; [/PHP] Ich dachte erst das jedes Element für einen Punkt des Dreiecks stehen würde, wenn ich allerdings bestimmte Werte zuweise habe ich aufeinmal 2 Dreicke und wenn ich ein Element entferne ist es immer noch ein Dreieck:confused: Ich bin also etwas verwirrt und hoffe das mir das einer von euch erklären kann Gruß Guybrush
  7. Guybrush Threepwood hat auf einen Beitrag in einem Thema geantwortet in C++: Compiler, IDEs, APIs
    Komisch, es scheint da wohl einen Unterschied zwischen Dialogfeld bsierenden und "normalen" Anwendungen zu geben.
  8. Was??? Das heißt ich schicke jemandem ein paar hundert SMS und der muß die dann bezahlen?:eek:
  9. Guybrush Threepwood hat auf einen Beitrag in einem Thema geantwortet in C++: Compiler, IDEs, APIs
    Naja, wenn dein Programm immer fehlerfrei läuft oder du es nicht per Alt+F4 beendest, dann nicht.
  10. Guybrush Threepwood hat auf einen Beitrag in einem Thema geantwortet in C++: Compiler, IDEs, APIs
    Das gibt ehrlich gesagt keinen Sinn;) Nach PostQuitMessage() brauchst du kein DestroyWindow() weil eh der Komplette Prozess beendet wird, außerdem sendet DestroyWindow() nur WM_DESTROY an das entsprechende Fenster. Um das Programm in jedem Fall zu beenden sollte man WM_DESTROY auch abfangen, da WM_CLOSE nur auftritt wenn man das Programm über das "X" beendet, oder halt die Nachricht selber schickt. Gruß Guybrush
  11. Ich bin auch Azubi und hab ebenfalls 30 Tage Urlaub
  12. meinst du den ? Ich hab einfach mal nach c64 gesucht;)
  13. Guybrush Threepwood hat auf einen Beitrag in einem Thema geantwortet in C++: Compiler, IDEs, APIs
    kuck mal im Debuger was passiert wenn du auf das X klickst
  14. Guybrush Threepwood hat auf einen Beitrag in einem Thema geantwortet in C++: Compiler, IDEs, APIs
    Das passiert, weil wenn du auf das X klickst nur die Nachricht WM_CLOSE gesendet wird. Versuchs mal so: case WM_CLOSE: case WM_DESTROY : { PostQuitMessage (0) ; return 0 ; } Gruß Guybrush
  15. Guybrush Threepwood hat auf einen Beitrag in einem Thema geantwortet in Plauderecke
    Achso, hab zwar noch nie was von gehört aber scheint ja praktisch zu sein:D
  16. Guybrush Threepwood hat auf einen Beitrag in einem Thema geantwortet in Plauderecke
    Ich hät da mal ne kurze zwischenfrage: tätowieren???
  17. Guybrush Threepwood hat auf einen Beitrag in einem Thema geantwortet in Hardware
    Ich weiß gar nicht was ihr habt, ich mag den Geruch nämlich:) Nach einiger Zeit legt er sich normalerweise aber wieder, ich würde einfach warten.
  18. Guybrush Threepwood hat auf einen Beitrag in einem Thema geantwortet in C und C++
    Hast du die beiden Pointer auf die Klassen auch initialisiert?
  19. Guybrush Threepwood hat auf einen Beitrag in einem Thema geantwortet in IT-Arbeitswelt
    Es gibt dazu übrigens schon mehrere Threats im Ausbildungsforum. Z.B.: Was soll ich anziehen??? Arbeitskleidung bei Banken Vorstellungsgespräch, was zieh ich an? Gruß Guybrush
  20. Damit bekomme ich die Meldung "Unbekanntes Label JNZ NEAR label1":confused:
  21. Hi, ich hab mir bei Programmersheaven den MicroAsm v1.0 runtergeladen und versucht ein Programm von mir zu Compilieren. Dabei hab ich ein paar Sprungadressen in Labels geändert, und zwar so wie in der dzugehörigen Hilfe gezeigt wird. Trotzdem bekomme ich immer den Fehler "Jump out of Range", habt ihr ne Ahnung warum? Hier mal der Code: #make_COM# ; COM file is loaded at CS:0100h ORG 100h MOV AH,01 INT 21 MOV BL,AL MOV AH,07 INT 21 MOV BH,AL CMP BH,0D JNZ label1 //Jump out of Range MOV BH,30 XCHG BL,BH label1: PUSH BX MOV BH,00 MOV AH,03 INT 10 MOV DL,00 MOV AH,02 INT 10 POP BX MOV DL,BL MOV AH,02 INT 21 MOV DL,BH INT 21 MOV DL,2D INT 21 MOV [0300],BL MOV [0302],BH MOV AH,01 INT 21 MOV BL,AL MOV AH,07 INT 21 MOV BH,AL CMP BH,0D JNZ label2 //Jump out of Range MOV BH,30 XCHG BL,BH label2: PUSH BX MOV AH,03 MOV BH,00 INT 10 MOV AH,02 MOV DL,03 INT 10 POP BX MOV DL,BL MOV AH,02 INT 21 MOV DL,BH INT 21 MOV DL,3D INT 21 MOV [0304],BL MOV [0306],BH MOV CL,00 MOV AL,[0306] SUB AL,30 MOV [0308],AL MOV AL,[0302] SUB AL,[0308] CMP AL,30 JNB label3 //Jump out of Range ADD AL,0A MOV CL,01 label3: MOV [0310],AL MOV AL,[0304] SUB AL,30 MOV [0314],AL MOV AL,[0300] SUB AL,[0314] SUB AL,CL MOV [0312],AL MOV DL,[0312] MOV AH,02 INT 21 MOV DL,[0310] INT 21 MOV AH,07 INT 21 INT 20 [/PHP] Gruß Guybrush
  22. Guybrush Threepwood hat auf einen Beitrag in einem Thema geantwortet in C und C++
    Ich hab`s mal etwas umgestellt und jetzt klappts auch: #include <stdio.h> #include <string.h> #include <ctype.h> int main() { char szSatz[255], cZeichen; int iLen; printf("Geben sie einen Satz ein:\n"); gets(szSatz); printf("Geben sie einen Buchstaben ein:\n"); scanf("%c", &cZeichen); iLen=strlen(szSatz); for (int i=0;i<iLen;i++) { if(szSatz[i] != cZeichen) szSatz[i] = tolower(szSatz[i]); else szSatz[i] = toupper(szSatz[i]); } printf("%s\n",szSatz); return 0; [/PHP] PS: Ich hab mir übrigens sagen lassen das man den Eingabebuffer nicht flushen sollte ( fflush(stdin) ), weil das Fehler verursachen kann. Gruß Guybrush
  23. Guybrush Threepwood hat auf einen Beitrag in einem Thema geantwortet in C und C++
    Hi, wie hast das denn versucht zu lösen? Dann kann ich dir evtl. sagen wo der Fehler liegt. Gruß Guybrush
  24. Guybrush Threepwood hat auf einen Beitrag in einem Thema geantwortet in C und C++
    Klar, aber da gab`s schon ein paar Threats drüber;) Ich hab dir mal ein paar rausgesucht: 1 2 3 Gruß Guybrush
  25. Guybrush Threepwood hat auf einen Beitrag in einem Thema geantwortet in C und C++
    Hi, bei einer while Schleife wird die Bedingung am Anfang abgefragt und bei einer do-while am Ende. BSP: int i=5; while(i <5) { //verarbeitung } do { //Verarbeitung } while(i<5); [/PHP] Bei der while Schleife würde im Gegensatz zur do-while die Verarbeitung gar nicht erst stattfinden. Gruß Guybrush

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.